<template>
  <div class="anime-axios-loading">
    <div class="loading">
      <!-- <div class="circle1"></div> -->
      <div class="circle2"></div>
      <div class="circle3"></div>
      <div class="circle4"></div>
    </div>
  </div>
</template>
<script>
import $ from "jquery";
import anime from "animejs/lib/anime.es.js";
export default {
  name: "AniLoading",
  data() {
    return {};
  },
  mounted() {
    anime({
      targets: ".circle1",
      rotateZ: 360,
      loop: true,
      easing: "linear"
    });
    anime({
      targets: ".circle2",
      rotateZ: [60, 420],
      loop: true,
      easing: "linear"
    });
    anime({
      targets: ".circle3",
      rotateZ: [120,480],
      loop: true,
      easing: "linear"
    });
    anime({
      targets: ".circle4",
      rotateZ: [180, 540],
      loop: true,
      easing: "linear"
    });
  },
  methods: {}
};
</script>
<style lang="scss" scoped>
.anime-axios-loading {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 10px;
  justify-content: center;
  align-items: center;
  background-color: white;
  .loading {
    position: relative;
    width: 50px;
    height: 50px;
    .circle1 {
      position: absolute;
      top: 0;
      left: 0;
      width: 50px;
      height: 50px;
      border: 2px solid black;
      border-radius: 50%;
      clip-path: polygon(50% 0px, 100% 0px, 100% 50%, 50% 50%);
    }
    .circle2 {
      position: absolute;
      top: 5px;
      left: 5px;
      width: 40px;
      height: 40px;
      border: 2px solid black;
      border-radius: 50%;
      clip-path: polygon(50% 0px, 100% 0px, 100% 50%, 50% 50%);
    }
    .circle3 {
      position: absolute;
      top: 10px;
      left: 10px;
      width: 30px;
      height: 30px;
      border: 2px solid black;
      border-radius: 50%;
      clip-path: polygon(50% 0px, 100% 0px, 100% 75%, 50% 75%);
    }
    .circle4 {
      position: absolute;
      top: 15px;
      left: 15px;
      width: 20px;
      height: 20px;
      border: 2px solid black;
      border-radius: 50%;
      clip-path: polygon(50% 0px, 100% 0px, 100% 100%, 50% 100%);
    }
  }
}
</style>